﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Core.Entities;
using System.Linq.Expressions;
using Core.Queries;
using Core.Messages;

namespace Core.IRepository
{
    public interface IBaseRepository<TId, TEntity>
    {
        void Add(TEntity entity);
        void Delete(TEntity entity);
        void Delete(Expression<Func<TEntity, bool>> findPredicate);
        void Edit(TEntity entity);
        TEntity FindBy(TId id);

        ListResponse<TEntity> FindBy(BaseQuery<TEntity> query);
        IList<TEntity> FindBy(Expression<Func<TEntity, bool>> findPredicate);
    }
}
